#include <iostream>
#include <fstream>
#include <sstream>
#include <cmath>
#include <string>
#include <cstring>
#include "Valores_Variables.h"
#include "Desplazamiento.h"
#include "Defs.h"

#ifndef MD5_H
#define MD5_H

class Message_Digest{
private:
	std::ifstream iss;
	size_t relleno;
	Valores FINAL_VALUES;
	Valores arg_val;
	Desplazamiento s;
	unsigned char buffer[BLOCK_SIZE];
	unsigned ((*bit_func[NUM_FUNC])(unsigned x,unsigned y,unsigned z));
	size_t ((*idx_func[NUM_FUNC])(size_t& idx));
	char set_to_char(int& idx,std::string& buffer);
	void procesar_bloque();
	void ejecutar_operacion(size_t idx,size_t func_idx);
	
public:
	Message_Digest(const char* filename);
	virtual ~Message_Digest();
	std::string obtener_resumen();
};
#endif
